# Maintainer: Andreas Kemnade <andreas@kemnade.info>
# Reference: <https://postmarketos.org/devicepkg>
pkgname=device-epson-embt2ws
pkgdesc="Epson Moverio BT-200"
pkgver=2
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="armv7"
options="!check !archcheck"
depends="
	linux-epson-embt2ws
	postmarketos-base
	u-boot-epson-embt2ws
	u-boot-tools
"
_pmb_recommends="linux-firmware-ti-connectivity"
makedepends="devicepkg-dev"

source="
	deviceinfo
	modules-initfs
	sdboot.cmd
"

build() {
	devicepkg_build $startdir $pkgname
}

package() {
	devicepkg_package $startdir $pkgname
	mkimage -A arm -O linux -T script -n postmarketOS \
		-d "$srcdir"/sdboot.cmd "$srcdir/sdboot.scr"
	install -Dm644 "$srcdir/sdboot.scr" "$pkgdir/boot/sdboot.scr"
}

sha512sums="
8a4f612172384c498d472e322829774902a7c1acd40646bb393662c2b5de9fc24a2f058718950efd8aea2c5b765ebb50ea99ef8ac60955dcabf5cf065e5de73a  deviceinfo
e6d26536578432bd1d9123d3b3eb621e39d5475e5ce9086c42fae213be6fa05d56bd6b42d08f6f5afccffe5b01ca940239c11b8046e0be1a5962ac95a0b0dfa4  modules-initfs
2c3a39107dd6c061d001d11211b816fc0e1fb060e0bcbf0fcf057d7910a7dcc4d1d06c6b0572ee0d616f1d06679ca48872395f62c1f44f5460cceefbbd2b5050  sdboot.cmd
"
